﻿using Xunit;
using YAPL.Language.Ast;

namespace YAPL.Test.YAPL.Language.Ast {

	public class ConstantExpressionTest {
		[Fact]
		public void NodeEqualsShouldWorkCorrectly() {
			var const1 = Expressions.StringLiteral("const1");
			var const2 = Expressions.StringLiteral("const2");
			var const3 = Expressions.StringLiteral("const1");

			Assert.False(const1.NodeEquals(null));
			Assert.False(const1.NodeEquals(const2));
			Assert.True(const1.NodeEquals(const3));
			Assert.False(const1.NodeEquals(Expressions.Variable("a")));
		}

	}

}
